import App from './App'

import Vue from 'vue'
import uView from "uview-ui";
Vue.use(uView);

import store from '@/store';
Vue.config.productionTip = false

// store挂载到全局
Vue.prototype.$store = store
App.mpType = 'app'

let ip = '192.168.1.8'

// 0代表开发环境 1.代表线上环境
Vue.prototype.$env = '0'
Vue.prototype.$baseIp = ip
Vue.prototype.$baseUrl = Vue.prototype.$env === '0' ?
	'http://' + ip + ':8080/api/' : 'http://zhbcm1.iaqqq.com/api/'

const app = new Vue({
	...App,
	store
})

// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
import httpInterceptor from '@/api/http.interceptor.js';
Vue.use(httpInterceptor, app);

// http接口API抽离，免于写url或者一些固定的参数
import httpApi from '@/api/http.api.js';
Vue.use(httpApi, app);

app.$mount()
